#ifndef VIDEOCONFERENCINGCLIENT_H
#define VIDEOCONFERENCINGCLIENT_H

#include <QDebug>
#include <QObject>
#include <QUdpSocket>
class videoConferencingClient : public QObject
{
    Q_OBJECT
public:
    explicit videoConferencingClient(QObject *parent = nullptr);
    void sendData(const QByteArray &data);
signals:

protected slots:
    void onReadData();

private:
    QUdpSocket udpSocket;
    // 接收和发送缓冲区
    QByteArray receiveBuffers[2]; // 两个接收缓冲区
    QByteArray sendBuffers[2];    // 两个发送缓冲区

    //当前使用的缓冲区索引
    int currentReceiveBufferIndex;
    int currentSendBufferIndex;

    //还需要写加密的事情
};

#endif // VIDEOCONFERENCINGCLIENT_H
